package com.example.alipay;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;

import com.example.alipay.PayInterface.Stub;

public class AliPayService extends Service {

	@Override
	public void onCreate() {
		System.out.println("开启远程支付服务");
		super.onCreate();
	}

	@Override
	public IBinder onBind(Intent intent) {
		return new MyIBinder();
	}

	@Override
	public boolean onUnbind(Intent intent) {
		return super.onUnbind(intent);
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	private class MyIBinder extends Stub {

		@Override
		public int pay(int money) throws RemoteException {
			return money;
		}
	}
	
}